<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <title>通道管理</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">

    <link rel="stylesheet" type="text/css" href="jquery/easyui1.4.2/themes/gray/easyui.css">
    <link rel="stylesheet" type="text/css" href="jquery/easyui1.4.2/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="mintor/css/layout.css"/>
    <link rel="stylesheet" type="text/css" href="css/assets/css/ace.min.css"/>

    <script type="text/javascript" src="jquery/easyui1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="jquery/easyui1.4.2/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="jquery/easyui1.4.2/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="jquery/extJs.js"></script>
    <script type="text/javascript" src="mintor/sensorConfiguration/js/channel.js"></script>
    <script type="text/javascript" src="js/date.js"></script>
    <c:if test="${fn:contains(sessionInfo.resourceList, '/channel/edit')}">
        <script type="text/javascript">
            $.canEdit = true;
        </script>
    </c:if>
    <c:if test="${fn:contains(sessionInfo.resourceList, '/channel/delete')}">
        <script type="text/javascript">
            $.canDelete = true;
        </script>
    </c:if>

</head>
<body style="background-color: white;">

<div class="widget-box" style="margin:16px 24px;padding-bottom:15px;text-align: center;">
    <div class="widget-header header-color-blue" style="border-top-left-radius:10px;border-top-right-radius:10px;">
        <h4 style="color:white;font-family: '微软雅黑'">传感器通道管理</h4>
    </div>
    <div class="widget-body" style="border-bottom-right-radius:10px;border-bottom-left-radius:10px;">
        <div class="widget-main">
            <div class="row" style="min-height:400px;" >

                <div class="easyui-layout" data-options="fit:true,border:false">
                    <div data-options="region:'center',fit:true,border:false">
                        <table id="dataGrid" data-options="fit:true,border:false"></table>
                    </div>
                    <div id="toolbar" style="display: none;">
                        <c:if test="${fn:contains(sessionInfo.resourceList, '/channel/add')}">
                            <a onclick="addChannel();" href="javascript:void(0);" class="easyui-linkbutton"
                               data-options="plain:true,iconCls:'icon-add'">添加</a>
                        </c:if>
                    </div>
                </div>


                <div id="dia-add">
                    <form id="form-add" method="post">
                        <div class="diacont">
                            <table align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="label">通道编号:</td>
                                    <td>
                                        <input name="channelNum" type="text" class="easyui-validatebox txt"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">通道名称:</td>
                                    <td>
                                        <input name="channelName" type="text" class="easyui-validatebox txt"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">通道类型:</td>
                                    <td>
                                        <input name="sensorId" type="text" id="c_type" class="easyui-combobox select"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">设备:</td>
                                    <td>
                                        <input name="equipmentId" type="text" id="e_id" class="easyui-combobox select"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">通道位置编号:</td>
                                    <td>
                                        <input name="positionNum" type="text" class="easyui-validatebox txt"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">通道位置:</td>
                                    <td>
                                        <input name="positionType" type="text" id="p_type"
                                               class="easyui-combobox select" data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">备注:</td>
                                    <td>
                                        <input name="descrip" type="text" class="easyui-validatebox txt"
                                               data-options="required:false">
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </form>
                </div>
                <div id="dia-edit">
                    <form action="channel/edit" method="post" id="form-edit">
                        <input type="hidden" name="id">
                        <div class="diacont">
                            <table align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="label">通道编号:</td>
                                    <td>
                                        <input name="channelNum" type="text" class="easyui-validatebox txt"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">通道名称:</td>
                                    <td>
                                        <input name="channelName" type="text" class="easyui-validatebox txt"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">通道类型:</td>
                                    <td>
                                        <input name="sensorId" type="text" id="c_type" class="easyui-combobox select"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">设备:</td>
                                    <td>
                                        <input name="equipmentId" type="text" id="e_id" class="easyui-combobox select"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">通道位置编号:</td>
                                    <td>
                                        <input name="positionNum" type="text" class="easyui-validatebox txt"
                                               data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">通道位置:</td>
                                    <td>
                                        <input name="positionType" type="text" id="p_type"
                                               class="easyui-combobox select" data-options="required:true">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">备注:</td>
                                    <td>
                                        <input name="descrip" type="text" class="easyui-validatebox txt"
                                               data-options="required:false">
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>